package ui;

import java.lang.reflect.InvocationTargetException;

import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

import remote.Connection;
import server.IServerFacade;
import server.IServerSession;
import core.ServerFacade;
import core.ServerSession;



public class AnimalsAdoptionClient {

	// Data Members Definition
	protected ServerFacade facade = null;
	protected Connection conn = null;
	protected IServerSession session = null;
	
	public AnimalsAdoptionClient()
	{
	}

	public static void main(String[] args) throws InterruptedException, InvocationTargetException {


		// Set the UI L&F as native system LookAndFeel
		try {
			UIManager.setLookAndFeel(
			        UIManager.getSystemLookAndFeelClassName());
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
			System.exit(1);
		} catch (InstantiationException e) {
			e.printStackTrace();
			System.exit(1);
		} catch (IllegalAccessException e) {
			e.printStackTrace();
			System.exit(1);
		} catch (UnsupportedLookAndFeelException e) {
			e.printStackTrace();
			System.exit(1);
		}

		AnimalsAdoptionClient client = new AnimalsAdoptionClient();
		
		// Display logon dialog
		LogonDialog logonDialog = new LogonDialog(client);
		SwingUtilities.invokeAndWait(logonDialog);
		
		// Check if logon was successful
		if (client.facade != null)
		{
			ClientFrame clientframe = new ClientFrame(client);
		}
	}
}
